<?php

class ArrayUtil {
	
	public static function remove_key(&$array, $key) {
		$value = $array[$key];
		if( $value != null )
			unset($array[$key]);
		return $value;
	}
	
	public static function remove_value(&$array, $value) {
		$key = array_search($value, $array);
		if( $key != null )
			unset($array[$key]);
		return $key;
	}
	
}

?>